1. Field of the Invention
The present invention relates to a mobile terminal and, more particularly, to a method for parsing the size of contents to be reproduced in a mobile communication device in order to accurately determine an actual size of the contents.
2. Description of the Related Art
Development of mobile communication techniques and mobile communication device fabrication techniques have enabled mobile terminal users to view video, listen to music, access the Internet or play video games with a mobile communication device, such as a mobile terminal. Mobile communication devices are no longer merely a means of communication, but also a mobile entertainment system.
Video, music, games, e-books or the like are referred as “mobile contents” or “contents” in an abbreviated form. When contents of the mobile terminal are reproduced, a determination whether the contents may be reproduced or if memory must be allocated is made according to a pixel size (width*height) of the contents.
In general, when the size of the contents is parsed to determine whether the contents may be reproduced or memory must be allocated, only the size information of the contents specified in a file format header of the contents is utilized. The file format header includes information indicating a type and size of contents and information related to arrangement of the data constituting the contents, thereby facilitating parsing of the size of the contents.
Although the size information of the contents that is specified in the file format header may be easily parsed, the indicated size may be smaller or greater than the actual size of the contents. Therefore, parsing the contents size by utilizing the information specified in the file format header may be unreliable.
Additionally, when it is desired to parse the contents, the information specified in the file format header is parsed first and then, if the contents can be reproduced and decoding is determined, a video codec is decoded and an audio codec is decoded. If the size of the contents specified in the file format header is different from the actual size of the contents, error processing cannot be performed smoothly when decoding.
In the mobile terminal, memory is allocated according to the size of the contents specified in the file format header. If the size of the contents specified in the file format header is smaller than the actual size, the size of the allocated space is smaller than the actual size of the contents and the contents cannot be stored in the memory, thereby disabling the mobile terminal. On the other hand, if the size of the contents specified in the file format header is larger than the actual size, an error would occur when reproducing the contents.
Therefore, there is a need for a method for accurately parsing the actual size of the contents of a mobile communication device that are to be reproduced. The present invention satisfies this and other needs.